<!DOCTYPE html>
<html>
<head>
    <title>离线人脸数据</title>
    #parse("sys/header.html")
</head>
<body>
<div id="rrapp" v-cloak>
    <div v-show="showList">
        <div id="queryDiv" class="queryDiv">
            <div class="grid-btn">
                <div class="form-group col-sm-2 keyword">
                    <input type="text" class="form-control" id="keyword" @keyup.enter="query"
                           placeholder="人名 / 身份证">
                </div>
                <a class="btn btn-primary" @click="query">查询</a>

                #if($shiro.hasPermission("ar/offface:save"))
                <a class="btn btn-primary" @click="add"><i class="fa fa-plus"></i>&nbsp;新增</a>
                #end
               <!-- #if($shiro.hasPermission("ar/offface:update"))
                <a class="btn btn-primary" @click="update"><i class="fa fa-pencil-square-o"></i>&nbsp;修改</a>
                #end-->
                #if($shiro.hasPermission("ar/offface:delete"))
                <a class="btn btn-primary" @click="del"><i class="fa fa-trash-o"></i>&nbsp;删除</a>
                #end
                <a class="btn btn-primary" @click="upload"><i class="fa fa-upload"></i>&nbsp;导入人脸EXCEL</a>

                <a class="btn btn-primary" @click="uploadface"><i class="fa fa-upload"></i>&nbsp;导入人脸图片</a>
            </div>
        </div>
        <table id="jqGrid"></table>
        <div id="jqGridPager"></div>
    </div>

    <div v-show="!showList" class="panel panel-default">
        <div class="panel-heading" style="display: block">{{title}}</div>
        <form id="upform" class="form-horizontal">
            <div class="form-group">
                <div class="col-sm-2 control-label">人员姓名</div>
                <div class="col-sm-10">
                    <input id="name" name="name" type="text" class="form-control" v-model="offFace.truename"
                           placeholder="人员姓名"/>
                </div>
            </div>
            <div class="form-group">
                <div class="col-sm-2 control-label">身份证号</div>
                <div class="col-sm-10">
                    <input id="idcard" name="idcard" type="text" class="form-control" v-model="offFace.facenumber"
                           placeholder="身份证号"/>
                </div>
            </div>
            <div class="form-group">
                <div class="col-sm-2 control-label">状态</div>
                <div class="col-sm-10">
                    <input id="status" name="status" type="text" class="form-control" v-model="offFace.status"
                           placeholder="状态"/>
                </div>
            </div>
            <div class="form-group">
                <div class="col-sm-2 control-label">人脸图片</div>
                <div class="col-sm-10">
                    <input id="face" name="face" type="file" class="file" data-show-upload="false" data-show-preview="false">
                </div>
            </div>

            <div class="form-group">
                <div class="col-sm-2 control-label">类型</div>
                <div class="col-sm-10">
                    <input id="type" name="type" type="text" class="form-control" v-model="offFace.type"
                           placeholder="类型"/>
                </div>
            </div>
            <!--<div class="form-group">
                <div class="col-sm-2 control-label">创建者ID</div>
                <div class="col-sm-10">
                    <input type="text" class="form-control" v-model="offFace.createUserId"
                           placeholder="创建者ID"/>
                </div>
            </div>
            <div class="form-group">
                <div class="col-sm-2 control-label">创建时间</div>
                <div class="col-sm-10">
                    <input type="text" class="form-control" v-model="offFace.createTime"
                           placeholder="创建时间"/>
                </div>
            </div>-->
            <div class="form-group">
                <div class="col-sm-2 control-label"></div>
                <input type="button" class="btn btn-primary" @click="saveOrUpdate" value="确定"/>
                &nbsp;&nbsp;<input type="button" class="btn btn-warning" @click="reload" value="返回"/>
            </div>
        </form>
    </div>


    <!-- 模态框（Modal） -->
    <div v-show="uploadmodal" class="modal fade" id="uploadmodal" tabindex="-1" role="dialog"
         aria-labelledby="myModalLabel" aria-hidden="true">
        <div class="modal-dialog">
            <div class="modal-content">


                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
                    <h4 class="modal-title">EXCEL上传</h4>
                </div>
                <div class="modal-body">

                    <form class="form-horizontal">
                        <div class="form-group">
                            <input id="inputexcel" name="inputexcel" type="file" class="file-loading">
                        </div>

                        <!-- <div class="form-group">
                             &lt;!&ndash;<div class="col-sm-2 control-label">人脸信息说明</div>&ndash;&gt;
                             <div class="col-sm-10">
                                 <input type="text" id = "period" name="period" class="form-control validate[required]" placeholder="请输入人脸信息存放周期"/>
                                 <span>周期必填，单位为天，如7、14，相应天数后数据会删除</span>
                             </div>
                         </div>-->

                    </form>

                </div>
                <!-- <div class="modal-footer">
                     <button type="button" class="btn btn-primary" @click="uploadData"><i class="fa fa-plus-circle"></i>&nbsp;确定
                     </button>
                     <button type="button" class="btn btn-default" data-dismiss="modal"><i class="fa fa-undo"></i>&nbsp;返回
                     </button>

                 </div>-->
            </div><!-- /.modal-content -->
        </div><!-- /.modal-dialog -->
    </div>


    <!-- 模态框（Modal） -->
    <div v-show="uploadzipmodal" class="modal fade" id="uploadzipmodal" tabindex="-1" role="dialog"
         aria-labelledby="myModalLabel" aria-hidden="true">
        <div class="modal-dialog">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
                    <h4 class="modal-title">人脸图片上传</h4>
                </div>
                <div class="modal-body">
                    <input id="uploadzip" name="uploadzip" type="file" class="file-loading">
                </div>
                <div class="modal-footer">
                    <!--    &lt;!&ndash; <button type="button" class="btn btn-primary" @click="uploadData"><i class="fa fa-plus-circle"></i>&nbsp;确定</button>&ndash;&gt;
                        <button type="button" class="btn btn-default" data-dismiss="modal"><i class="fa fa-undo"></i>&nbsp;返回
                        </button>-->

                </div>
            </div><!-- /.modal-content -->
        </div><!-- /.modal-dialog -->
    </div>


</div>


<script src="${rc.contextPath}/js/ar/offface/offface.js?_${date.systemTime}"></script>
</body>
</html>